<?php

namespace App\Http\Models;

use Illuminate\Database\Eloquent\Model;

/**
 * App\Http\Models\Flight
 *
 * @property int $id 航班ID
 * @property string|null $flight_no 航班号 公司代码+3/4位数
 * @property int|null $start_terminal_id 起始站ID
 * @property int|null $end_terminal_id 终点站ID
 * @property int|null $model_id 机型ID
 * @property float|null $pricing 机票定价
 * @method static \Illuminate\Database\Eloquent\Builder|Flight newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|Flight newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|Flight query()
 * @method static \Illuminate\Database\Eloquent\Builder|Flight whereEndTerminalId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|Flight whereFlightNo($value)
 * @method static \Illuminate\Database\Eloquent\Builder|Flight whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|Flight whereModelId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|Flight wherePricing($value)
 * @method static \Illuminate\Database\Eloquent\Builder|Flight whereStartTerminalId($value)
 * @mixin \Eloquent
 */
class Flight extends Model
{
    //
	public $timestamps = false;
	protected $fillable = ['id', 'flight_no', 'start_terminal_id', 'end_terminal_id', 'model_id', 'pricing'];

	public function on_flights() {
		return $this->hasMany(OnFlight::class, 'flight_id', 'id');
	}
}
